package core.gui;

import java.io.File;

import javax.swing.JFileChooser;
import javax.swing.JPanel;

/**
 * A basic JFileChooser used to retrieve a PDB upon running the file.
 * @author Julian
 *
 */
//TODO: Improve GUI
public class FileChooser extends JPanel {

	JFileChooser fc;
	private File PDB;
	public FileChooser(){
		fc = new JFileChooser();
		int returnVal = fc.showOpenDialog(FileChooser.this);
	
		
	    if (returnVal == JFileChooser.APPROVE_OPTION) 
	        PDB = fc.getSelectedFile();
	}
	
	/**
	 * Retrieve the file chosen by the user through the JFileChooser
	 * @return
	 */
	public File getPDBFile(){
		return PDB;
	}
}